home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / utils / filex16.zip / FILEX.MAN < prev    next >
Text File  |  1996-06-08  |  8KB  |  215 lines

  1. Jouni Miettunen * jon@stekt.oulu.fi * Oulu * Finland * Europe * 1993-96
  2.  
  3. FILEX(1)                    USER COMMANDS                      FILEX(1)
  4.  
  5.  
  6.  
  7. NAME
  8.      filex - determine the type of a file by examining its name
  9.      and extension.
  10.  
  11. SYNOPSIS
  12.      file [ -1abdfnpqR?* ] target ...
  13.  
  14. DESCRIPTION
  15.      filex studies the filename extension and tells what kind of
  16.      files and what programs usually use that specific extension.
  17.  
  18.      filex uses the database file extensio.txt or any other user
  19.      defined data file to look up the extension information.
  20.  
  21. OPTIONS
  22.      -1   Show and study each different file extension only once.
  23.  
  24.      -a   Show all known possibilities.
  25.  
  26.      -b filename.ext
  27.           Identify only given filename extension, these bogus
  28.           files don't have to exist.
  29.  
  30.      -d   Show the current directory name at the beginning.
  31.  
  32.      -f   Don't handle hidden or system files (Force).
  33.  
  34.      -n   Show only unknown files (Noise).
  35.  
  36.      -p   Pause after each screen page and wait for a key press.
  37.  
  38.      -q   Show only known files (Quiet).
  39.  
  40.      -R   Recurse through all subdirectories.
  41.  
  42.      -?   Info.
  43.  
  44.      -*   Print the database Redblack search tree
  45.  
  46. EXAMPLES
  47.  
  48.      Command line options can be given separated or together and
  49.      the switch can be either unixlike "-" or DOS-like "/":
  50.  
  51.          filex -1 -n *.*
  52.          filex /1 /n *.*
  53.          filex -n1   *.*
  54.          filex /n -1 *.*
  55.  
  56.      Period "." is same as "*.*" and giving a directory name
  57.      identifies all files in that directory:
  58.  
  59.          filex *.*
  60.          filex .
  61.          filex d:
  62.          filex c:\dir\subdir
  63.  
  64.      You can have several targets specified on command line,
  65.      including wildcards:
  66.  
  67.          filex ..\a*.* project.* d: dir1\ dir2
  68.  
  69.      You can identify files that don't exist with -b (bogus) option:
  70.  
  71.          filex -b file.a file.b file.c
  72.          filex -b .ext
  73.  
  74.      If you don't want to identify some files and have a tool to
  75.      temporarily change their file attribute to hidden:
  76.  
  77.          except (a*.*) filex -f *.*
  78.  
  79.      Listfiles are supported and thus you can check the database:
  80.  
  81.          filex @extensio.txt
  82.  
  83.      Little mark (Ascii 250) in front of description notifies if
  84.      there are available several descriptions for the extension.
  85.      You can see all of them by using -a (all) option:
  86.  
  87.          C:\>filex filex.c
  88.          filex.c      ·C source code file
  89.  
  90.          C:\>filex -a filex.c
  91.          filex.c      ·C source code file
  92.                        compressed unix file archive created by COMPACT
  93.  
  94.  
  95.      Or you could first locate all extensions with more than one
  96.      possible description and then check only them more closely:
  97.  
  98.          filex . | grep "·" > tmp             ( ·  is Ascii 250)
  99.          filex -ap @tmp
  100.  
  101.      If you want to know all file extensions related to some area,
  102.      you can use option -w to search the database. Please remember
  103.      the search is case sensitive ie. a is not A:
  104.  
  105.          filex -w graphics
  106.          filex -w "source code"
  107.          filex -w source code
  108.  
  109.     NOTE: the last feature is at the moment disabled. It was part
  110.     of an ambitious idea, which was never realized. This is a note
  111.     for myself to remember the fact and an excuse for old users..
  112.  
  113. ENVIRONMENT
  114.      Environment variable FILEX can be set to point to any valid
  115.      File Extension Database.
  116.  
  117.          set filex=database.ext
  118.  
  119. FILES
  120.      extensio.txt
  121.  
  122.      First Filex checks if environment variable FILEX exists and
  123.      then if a file named "extensio.txt" exist in any directory
  124.      specified in the PATH.
  125.  
  126.      Format of File Extansion Database is the following:
  127.      - first character of every line is . (period, ASCII 46)
  128.      - 1 to 3 characters (extension)
  129.      - TAB character (horizontal TAB, ASCII 9)
  130.      - min 5 to max 63 characters (description of extension)
  131.      - every line has to end with CR/LF
  132.      - even the last line has to end with CR/LF (usually does)
  133.  
  134.      At the moment the max allowed database size is restricted by
  135.      the amount of free conventional memory ie. free memory below
  136.      640 KB memory boundary. The same memory area has to hold also
  137.      the tree nodes that take quite a bit of memory. At least 330k
  138.      database (8315 extensions) has been used without problems.
  139.  
  140.      A self-balancing red-black tree is created so that the first
  141.      found description for extension will always be told as first.
  142.      You can customize the output by changing the order of lines 
  143.      in database. They can be in any order, I just like to see them
  144.      alphabetically for other purposes.
  145.  
  146.      @listfile
  147.  
  148.      The program supports listfiles eg. you can collects filenames
  149.      into a file and then give that preceded by @ character as an
  150.      argument to Filex. For every line only the first possible filename
  151.      extension is identified as a bogus filename, but there can be more
  152.      text on same line. Please note that only the first 12 characters
  153.      of a each line are read and checked. This is enough for the DOS
  154.      8+3 filenames, but not for any path.
  155.  
  156. HISTORY
  157.      0.0    late 1992    file.btm (4DOS batch file)
  158.      1.0    30-Jan-93    original version based on file.btm (jambtm02.zip)
  159.                          (1000 extensions)
  160.      1.1    28-Feb-93    red-black tree functions & large memory model
  161.      1.2    27-Jun-93    2x faster start up (64K data limit)
  162.                          (1200 extensions)
  163.      1.21   03-Jul-93    I forgot to enable "notify if several"..
  164.      1.3    02-Aug-93    @listfile support, bugfix in Notify, credits,
  165.                          removed all DEBUG code (about 10K smaller),
  166.                          pause after each screen page, long extensions,
  167.                          word search in database
  168.                          (1500 extensions)
  169.      1.4    13-Jun-94    Cormen,Leiserson,Rivest bottom-up redblack tree
  170.                          About 10% faster start == datatree creation
  171.                          Ported to TC3++ -> exe 26k instead of 45k
  172.                          (1600 extensions)
  173.      1.41   24-Nov-94    Cleaned up the code - not a public release
  174.      1.5    10-Apr-95    64k database limitation removed (and still in
  175.                          large memory model and without HUGE pointers :)
  176.                          Rewrote @listfile code == made >64k compatible
  177.                          (1700 extensions)
  178.      1.6    08-Jun-96    No changes in code, over 1800 extensions. I
  179.                          still use this program actively! I also made
  180.                          a WWW page for the extensions.
  181.  
  182. SEE ALSO
  183.      Robert Sedgewick: "Algorithms in C" ISBN 0-201-51425-7 (p.220)
  184.  
  185.      Dr. Dobb's Journal #187 April 1992 (p.42) Bruce Schneier:
  186.          "Red-Black Trees"
  187.  
  188.      Cormen, Leiserson, Rivest: "Introduction to Algorithms" (p.263)
  189.          ISBN 0-262-03141-8 (MIT Press)
  190.  
  191.      Filex is not perfect, but it's a perfect companion for a fully
  192.      unixlike File utility. At the moment I know two good ones:
  193.  
  194.      Ricki's File2, Filed39a (see others.txt for more information)
  195.  
  196. BUGS
  197.      If file has a wrong filename extension, filex obviously makes
  198.      a wrong identification. No other known bugs.
  199.  
  200. STATUS
  201.      This program is Freeware. Use, share and enjoy. The File Extension
  202.      database can be freely used (see Credits.txt for terms).
  203.  
  204. AUTHOR
  205.      Mr. Jouni Miettunen
  206.      Rautatienkatu 20 A 10
  207.      FIN-90100 OULU
  208.      FINLAND - EUROPE
  209.  
  210.  
  211.  
  212. FILEX(1)                    USER COMMANDS                      FILEX(1)
  213.  
  214. Jouni Miettunen * jon@stekt.oulu.fi * Oulu * Finland * Europe * 1993-96
  215.